import Router from 'koa-router';
import { jwtMiddleware } from '@/middlewares/jwt';
import { userMiddleware } from '@/middlewares/user';
import { userRouter } from './user';
import { activityRouter } from './activity';
import { photoRouter } from './photo';

// 根路由/api/v1/*
export const apiRouter = new Router({ prefix: '/api/v1' });

// jwt
apiRouter.use(jwtMiddleware());

// user load
apiRouter.use(userMiddleware);

// 添加路由在这里
export const allRoutes = [
  userRouter,
  activityRouter,
  photoRouter
];






